<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <link rel="stylesheet" href="./css/index.css">
</head>
<body>
    <button onclick="doPushState()">pushState</button>        
    <button onclick="count()">count</button>
    
    <script>
        var index=1;
        $(function(){
            alert(location.href);
        });

        function doPushState(){
            history.pushState({}, "newtitle","test"+(index++)+".html");
        }
      
        function count(){
            alert(window.history.length);
        }
    </script>
</body>
<!-- <script src="./js/index.js"></script> -->
</html>